package IO流;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;

public class 对象序列化输出 {
    public static void main(String[] args) throws IOException {
        ObjectOutputStream oos = new ObjectOutputStream(new  FileOutputStream("file文件夹\\对象.txt"));
        Student s1 = new Student("宋雨琦", 18, 100);
        Student s2 = new Student("minnie", 18, 100);
        oos.writeObject(s1);
        oos.writeObject(s2);
        oos.close();
    }
}
